//
//  UIImage+Expansion.m
//  lottery
//
//  Created by 赵国腾 on 16/6/11.
//  Copyright © 2016年 赵国腾. All rights reserved.
//

#import "UIImage+Expansion.h"

@implementation UIImage (Expansion)

+ (UIImage *)imageWithOriRenderingImage:(NSString *)imageName {
    
    UIImage *image = [UIImage imageNamed:imageName];
    // 不需要渲染图片
    image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    
    return image;
}

+ (UIImage *)imageWithStretchableImage:(NSString *)imageName {

    UIImage *naviImage = [UIImage imageNamed:imageName];
    naviImage = [naviImage stretchableImageWithLeftCapWidth:naviImage.size.width * 0.5 topCapHeight:naviImage.size.height * 0.5];
    
    return naviImage;
}

@end
